<?php

use think\facade\Route;

/**
 * 测试
 */
Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});
Route::get('hello/:name', 'index/hello','GET|POST');
Route::get('vue/:id/:name', 'index/vue');

/**
 * 系统用户
 */
Route::group('user',function(){
    Route::any('login','admin.User/login');
    Route::any('register','admin.User/register');
    Route::any('info','admin.User/info');
    Route::any('logout','admin.User/logout');
});

/**
 * 普通用户
 */
Route::group('member',function(){
    Route::any('list','admin.Member/index');
    Route::get('info/:id','admin.Member/info');
    Route::get('changeStatus','admin.Member/changeStatus');
    Route::get('delMember','admin.Member/delMember');
    Route::post('create','admin.Member/create');
    Route::post('update','admin.Member/update');
});

/**
 * 抽奖管理-礼包管理
 */
Route::group('box',function(){
    Route::any('index','admin.Box/index');
    Route::any('list','admin.Box/list');
    Route::get('info','admin.Box/info');
    Route::get('changeStatus','admin.Box/changeStatus');
    Route::get('delBox','admin.Box/delBox');
    Route::post('create','admin.Box/create');
    Route::post('update','admin.Box/update');
});

/**
 * 抽奖管理-奖品管理
 */
Route::group('prize',function(){
    Route::any('index','admin.Prize/index');
    Route::get('info/:id','admin.Prize/info');
    Route::get('changeStatus','admin.Prize/changeStatus');
    Route::get('delPrize','admin.Prize/delPrize');
    Route::post('create','admin.Prize/create');
    Route::post('update','admin.Prize/update');
    Route::any('analog','admin.Prize/analog');
});
